Mastering React Test-Driven Development - Second Edition by Daniel Irvine
Author:Daniel Irvine
Language: eng
Format: epub, mobi
Publisher: Packt Publishing Pvt. Ltd.
Published: 2022-09-15T00:00:00+00:00
In test/CustomerForm.test.js, update the import that contains blankCustomer, pulling in the new validCustomer too:import {
blankCustomer,
validCustomer,
} from "./builders/customer";
Starting at the top, modify each test that simulates a submit event. Each should be mounted with this new validCustomer object. After making these changes, run your tests and make sure they are still passing before continuing:render(<CustomerForm original={validCustomer} />);
Add a new test for submitting the form. This can go alongside the other submit tests, rather than in the validation block:it("does not submit the form when there are validation errors", async () => {
render(<CustomerForm original={blankCustomer} />);
await clickAndWait(submitButton());
expect(global.fetch).not.toBeCalled();
});
Download
Mastering React Test-Driven Development - Second Edition by Daniel Irvine.mobi
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
| ActiveX | ASP.NET |
| Cold Fusion | CSS |
| DHTML | Java Server Pages |
| JavaScript | PHP |
| Python | Ruby |
| XSL |
The Mikado Method by Ola Ellnestam Daniel Brolund(11864)
Hello! Python by Anthony Briggs(11788)
Dependency Injection in .NET by Mark Seemann(10999)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(9420)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(8808)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(8594)
Svelte with Test-Driven Development by Daniel Irvine(8061)
Test-Driven Development with PHP 8 by Rainier Sarabia(7818)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(7632)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(7407)
Kotlin in Action by Dmitry Jemerov(7262)
Web Development with Django by Ben Shaw Saurabh Badhwar(7128)
React Application Architecture for Production by Alan Alickovic(6822)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(6445)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4933)
Audition by Ryu Murakami(4840)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4799)
Solidity Programming Essentials by Ritesh Modi(4517)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4410)